<?php
/**
 * Created by PhpStorm.
 * User: sofwu
 * Date: 2019/1/14
 * Time: 下午3:22
 */
namespace App\Http\Transformer;

use App\Model\Keywords;
use League\Fractal\TransformerAbstract;

class KeywordsTransformer extends TransformerAbstract
{
    public function transform(Keywords $keywords)
    {
        return[
            'id'=> $keywords->id,
            'name'=> $keywords->name,
        ];
    }
}